// package: rewords-server-2024
// filename: hook
// author: diogoxiang@gmail.com
// time: 2024/7/12 上午11:06

package hook

import (
	"rewords-server-2024/internal/service"

	"github.com/gogf/gf/v2/net/ghttp"
)

type sHook struct {
}

// RegisterHook 注册钩子
func init() {
	service.RegisterHook(New())
}

func New() *sHook {
	return &sHook{}
}

// BeforeServe 启动前
func (s *sHook) BeforeServe(r *ghttp.Request) {
	// g.Log().Infof("BeforeServe: %s", r.RequestURI)
}

// AfterOutput 输出后
func (s *sHook) AfterOutput(r *ghttp.Request) {
	s.accessLog(r)
	//s.lastAdminActive(r)
}
